#include "Blocks/LadderBlock.h"

using namespace PocketSurvival::Engine;

namespace PocketSurvival
{
	LadderBlock::LadderBlock()
	{
		addInheritance(this);
	}

    BlockPlacementData LadderBlock::getPlacementValue(ComponentMiner *componentMiner, int32_t value, const TerrainRaycastResult &raycastResult)
    {
		BlockPlacementData result;
		result.value = (raycastResult.cellFace.face < 4) ? Terrain::MakeBlockValue(getIndex(), 0, SetFace(0, raycastResult.cellFace.face)) : 0;
		result.cellFace = raycastResult.cellFace;
		return result;
    }

} // namespace PocketSurvival

